package com.y2w.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.y2w.common.utils.PageUtils;
import com.y2w.gulimall.member.entity.MemberEntity;
import com.y2w.gulimall.member.exception.EmailExistException;
import com.y2w.gulimall.member.exception.PhoneExistException;
import com.y2w.gulimall.member.exception.UserNameExistException;
import com.y2w.gulimall.member.vo.MemberLoginVo;
import com.y2w.gulimall.member.vo.MemberRegistVo;
import com.y2w.gulimall.member.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author y2w
 * @email y2w@gmail.com
 * @date 2023-02-08 20:14:45
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo vo);

    void checkEmailUnique(String email) throws EmailExistException;
    void checkUserNameUnique(String userName) throws UserNameExistException;
    void checkPhoneUnique(String phone) throws PhoneExistException;

    MemberEntity login(MemberLoginVo vo);

    MemberEntity login(SocialUser s, String user);
}

